﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YTBZ.PUB.COMMON;

namespace YTBZ.PUB
{
    public partial class AttachmentView : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             if (!IsPostBack)
            {
                string fileName = Request.QueryString["name"];
                string filePath = Request.QueryString["path"];

                if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(filePath))
                {
                    jsMessage("您请求的连接错误，请按正规路径操作！");
                    return;
                }
                if (!File.Exists(filePath))
                {
                    jsMessage("找不到该文件！");
                    return;
                }

                SupFile supFile = new SupFile(filePath);
                supFile.OpenDownFile(fileName, filePath);
            }
        }
    }
}
